/**********************************************************************
* Filename: Instant.java
* Created: 2013/05/31
* @author Fernando Brito e Abreu
**********************************************************************/
package org.quasar.airNova.businessLayer;

import org.quasar.airNova.persistenceLayer.Database;

import java.util.Set;

public class Instant
{
	
	/***********************************************************
	* @return all instances of class Instant
	***********************************************************/
	public static Set<Instant> allInstances()
	{
		return Database.allInstances(Instant.class);
	}
	
	private int hours;
	private int minutes;
	private int seconds;
	
	/**********************************************************************
	* Default constructor
	**********************************************************************/
	public Instant()
	{
	}
	
	/**********************************************************************
	* Parameterized constructor
	* @param hours the hours to initialize
	* @param minutes the minutes to initialize
	* @param seconds the seconds to initialize
	**********************************************************************/
	public Instant(int hours, int minutes, int seconds)
	{
		this.hours = hours;
		this.minutes = minutes;
		this.seconds = seconds;
	}
	
	/**********************************************************************
	* Standard attribute getter
	* @return the hours of the instant
	**********************************************************************/
	public int hours()
	{
		return hours;
	}
	
	/**********************************************************************
	* Standard attribute setter
	* @param hours the hours to set
	**********************************************************************/
	public void setHours(int hours)
	{
		this.hours = hours;
	}
	
	/**********************************************************************
	* Standard attribute getter
	* @return the minutes of the instant
	**********************************************************************/
	public int minutes()
	{
		return minutes;
	}
	
	/**********************************************************************
	* Standard attribute setter
	* @param minutes the minutes to set
	**********************************************************************/
	public void setMinutes(int minutes)
	{
		this.minutes = minutes;
	}
	
	/**********************************************************************
	* Standard attribute getter
	* @return the seconds of the instant
	**********************************************************************/
	public int seconds()
	{
		return seconds;
	}
	
	/**********************************************************************
	* Standard attribute setter
	* @param seconds the seconds to set
	**********************************************************************/
	public void setSeconds(int seconds)
	{
		this.seconds = seconds;
	}
	
	/**********************************************************************
	* User-defined operation specified in SOIL/OCL
	* @param hours the hours to set
	* @param minutes the minutes to set
	* @param seconds the seconds to set
	**********************************************************************/
	public void init(int hours, int minutes, int seconds)
	{
		//	TODO
	}
	
	/**********************************************************************
	* Object serializer
	**********************************************************************/
	public String toString()
	{
		return "Instant [hours=" + hours + ", minutes=" + minutes + ", seconds=" + seconds + "]";
	}
	
}
